<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script type="text/javascript">
  function GetQueryString(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) return unescape(r[2]);
    return null;
  }

  function loadMethod() {

    var id = GetQueryString("id");
    var urlNew = window.location.href.split("detail.html")[0] + 'index.html#/pages/Detail?id=' + id;

    this.location = urlNew;
  }

  window.onload = loadMethod();
</script>
</body>
</html>
